gl renderer: Fix color matrix shader
authorTimm Bäder <mail@baedert.org>
Sat, 18 May 2019 07:33:38 +0000 (09:33 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 18 May 2019 11:47:59 +0000 (13:47 +0200)
We *just* computed a un-premultiplied color, maybe we should also use
it.

gsk/resources/glsl/color_matrix.fs.glsl

index 07875fe0b48d980acbb8eb7398f66876f956f73a..284e0a9e654a5db5a85c07c681a3cbcced627da6 100644 (file)
@@ -11,7 +11,7 @@ void main() {
   if (color.a != 0.0)
     color.rgb /= color.a;
 
-  color = u_color_matrix * diffuse + u_color_offset;
+  color = u_color_matrix * color + u_color_offset;
   color = clamp(color, 0.0f, 1.0f);
 
   color.rgb *= color.a;